package yto.freemarker.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dongxing
 * @create 2018-02-13 9:42
 **/
@RestController
@RefreshScope
public class ConfigurationController {

    @Value("${profile}")
    private String profile;

    @GetMapping("/profile")
    public String getProfiles() {
        return this.profile;
    }
}
